package com.zbs.framework.dao.passport.wechat.service;


import com.zbs.framework.dao.passport.entity.AcctWechat;
import com.zbs.framework.dao.passport.entity.MNAccount;
import weixin.popular.bean.sns.SnsToken;
import weixin.popular.bean.user.User;

public interface WechatAccountService {

    /**
     * 根据openId查找账号
     * @param openId
     * @return
     */
    MNAccount findAccount(String openId);

    /**
     * 新增账号
     * @param openId
     * @return
     */
    AcctWechat create(String openId);

    /**
     * 获取token
     * @param code
     * @return
     */
    SnsToken getSnsToken(String code);

    /**
     * 获取微信用户信息
     * @param token
     * @return
     */
    User getWechatUserInfo(SnsToken token);
}
